package com.fast.controller;

import com.fast.pojo.AjaxResult;
import com.fast.service.SysUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.constraints.NotNull;

/**
 * @author ruan cai yuan
 * @version 1.0
 * @fileName com.fast.controller.SysUserController
 * @description: 用户相关接口
 * @since 2024/6/23 13:56
 */
@Slf4j
@RestController
@Validated
@RequestMapping("/user")
public class SysUserController {

    @Resource
    private SysUserService userService;

    /**
     * 根据用户ID获取用户信息
     *
     * @param userId 用户ID
     * @return 用户信息
     */
    @GetMapping("getUserInfoById")
    public AjaxResult getUserInfoById(@NotNull String userId) {
        return AjaxResult.success(userService.getUserInfoById(userId));
    }


}
